import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/admin";

// 查询
export function listApp(query) {
  return request({
    url: '/app/page',
    method: 'post',
    data: query
  })
}

export function listAllApp(query) {
  return request({
    url: '/app/getAllApps',
    method: 'post',
    data: query
  })
}



// 新增
export function addApp(data) {
  return request({
    url: '/app/addApp',
    method: 'post',
    data: data
  })
}

// 修改
export function updApp(data) {
  return request({
    url: '/app/updApp',
    method: 'post',
    data: data
  })
}

// 删除
export function delApp(server) {
  return request({
    url: '/app/delApp?id='+server ,
    method: 'get'
  })
}

export function getAppType() {
  return request({
    url: '/app/getAppType' ,
    method: 'get'
  })
}

/**查询配置*/
export function listSetting(query) {
  return request({
    url: '/appSet/page',
    method: 'post',
    data: query
  })
}

/**修改配置*/
export function updSetting(data) {
  return request({
    url: '/appSet/saveSet',
    method: 'post',
    data: data
  })
}
